home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 January
/
1993-01.d64
/
hex converter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
398b
|
16 lines
0 clr
1 print" (1) hex to decimal
2 [153]" or
3 print" (2) decimal to hex?
4 [161]a$:[139] a$[178]""[167]4
5 [139] a$[179][177]"2"[167] 100
10 [143] decimal to hexadecimal
20 [133]"decimal value";d
50 y[178][181](d[173]16):z[178]16[172]y:h$[178][199](y[170]55[170](7[172](y[179]10)))[170][199](d[171]z[170]55[170](7[172]((d[171]z)[179]10)))
70 [153]:[153]"hex value is $";h$
80 [128]
100 [143] hex to dec
120 [133]"hex value $";h$
130 l[178][198]([200](h$,1)):r[178][198]([201](h$,1)):d[178]((l[171]55[171]7[172](l[179]57))[172]16)[170]r[171]55[171]7[172](r[179]58)
140 [153]:[153]"dec value is ";d